home *** CD-ROM | disk | FTP | other *** search
- Path: news.campus.mci.net!usenet
- From: Daniel Cotter <cotter@www.cns.uky.edu>
- Newsgroups: comp.lang.c++
- Subject: Trouble w/ random numbers...please help
- Date: 3 Feb 1996 20:22:22 GMT
- Organization: MCI State Government and University Systems
- Message-ID: <4f0g5u$879@ns.campus.mci.net>
- NNTP-Posting-Host: s01-pm02.uky.campus.mci.net
-
- I'm trying to write a program that will generate a set of
- random numbers between 3 and 18. I have several problems with
- this program.
- 1. C++ always generates same number(346)
- 2. I don't know how to give a range. I've tried 3-18, but
- it thinks I mean to subtract(3-18=15)
- 3. When it does work, it's always the same number
-
- Please help,
- Cotter
-
- "Out of the black and into the blue"-Neil Young
-
-